#include <functional>
#include <iostream>
#include <list>
#include <vector>
#include <array>
#include <tuple>
#include <string>
#include <memory>

using namespace std;
class my_class
{
    int i;
};

int test_share_ptr()
{
    shared_ptr<my_class> p2(new my_class());
}

int fun(int& ri)
{
    cout << "Entering fun\n";
    ri++;
    return 0;
}
int test_tuple()
{
    tuple<int,char,string> t;// = make_tuple(1,'a',"xyz");
}
int test_array()
{
    array<int, 5> a = {{1,2,3,4,5 }};
    std::cout <<a[3] <<'\n';
}
int test_ref()
{
    int i = 0;
    cout << i << endl;
    fun(ref(i));
    cout << i << endl;

    std::list<int> numbers;
    std::vector<reference_wrapper<int> > number_refs;
    for(int i = 0; i < 100; ++i) 
    {
        numbers.push_back(4*i*i^2 - 10*i + 3);
        number_refs.push_back(ref(numbers.back()));
    }    
}

int main()
{
    test_array();
    test_ref();
}
